Repository navigation
fix: ad-hoc sign the macOS app so it opens after install - #59
Merged
Merged
Conversation
macOS reported the installed app as damaged and offered to move it to the Bin. With no Developer ID, electron-builder left the app unsigned (it has no ad-hoc fallback), and packaging breaks Electron's own signature, so Apple Silicon treats the download as damaged. - electron-builder.yml: mac.identity '-' for ad-hoc signing, and hardenedRuntime off, since with ad-hoc signing its library validation rejects Electron's frameworks and it only matters for notarization. - Getting started: first-launch steps for macOS 15 and later (Open Anyway in Privacy & Security), for earlier versions, and the xattr fix for builds up to 0.11.0.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS reported the installed app as damaged and offered to move it to the Bin.
Cause
The release job turns certificate discovery off (
CSC_IDENTITY_AUTO_DISCOVERY: 'false') andelectron-builder.ymlset noidentity, so electron-builder skipped signing entirely: its schema states there is no automatic ad-hoc fallback. Packaging changes Electron's bundle, which breaks the ad-hoc signature Electron ships with, and on Apple Silicon a downloaded app with no valid signature is reported as damaged rather than as coming from an unidentified developer.Fix
electron-builder.yml:mac.identity: '-'(ad-hoc signing) andmac.hardenedRuntime: false. With ad-hoc signing, hardened runtime's library validation rejects Electron's pre-signed frameworks, and it only matters for notarization, which needs a Developer ID.docs/getting-started.md: first-launch steps for macOS 15 and later (Privacy & Security, Open Anyway), for earlier versions (right-click, Open), and thexattr -dr com.apple.quarantinefix for builds up to 0.11.0.CHANGELOG.md: Fixed entry.Verification
npx electron-builder --mac diron Linux loads the new config and packages the app; signing is skipped there ("supported only on macOS").macos-latestrelease job signs; the first release built from this change needs a check that the installed app opens.Switching to real signing later means removing
identity: '-', re-enabling hardened runtime with entitlements, adding the certificate and notarization secrets, and letting the updater install on macOS.